<link href="<?php echo $this->webroot ?>/theme/default/images/article.css" rel="stylesheet" type="text/css" media="screen" />
<div id="content">
        <div class="entry">
            <h2><a href="#"><?php echo $article->getTitle() ?></a></h2>
            <div class="entryHeader">作者：<span class="author"><a href="#"><?php echo $article->getAuthor() ?></a></span>&nbsp;&nbsp;&nbsp;&nbsp;<span><?php echo $article->getCreated_at() ?></span></div>
            <div class="entryBody">
            <?php echo $article->getContent() ?>
            </div>
            <div class="entryFooter">
                <span><a href="#">评论(<?php echo $article->getComment_count() ?>)</a></span><span><a href="#">阅读(69)</a></span><span class="tag">标签：
                <?php foreach ($article->getTagsArr() as $tag): ?>
                <a href="<?php echo url_for('article/tag/'.$tag) ?>"><?php echo $tag ?></a>
                <?php endforeach; ?>
                </span>
            </div>
        </div>
        <a name="cmt"></a>
        <div id="comment">
            <h2>[评论]</h2>
            <ul>
            <?php foreach ($article->getComments() as $comment): ?>
                <li>
                    <div class="cmtBody">
                        <p><?php echo $comment->getContent(); ?></p>
                    </div>
                    <div class="cmtFooter">
                        <span class="author"><a href="<?php echo $comment->getHomepage() ?>">[<?php echo $comment->getName() ?>]</a></span>发表于<span class="date"><?php echo $comment->getCreated_at() ?></span>
                    </div>
                </li>
            <?php endforeach; ?>
            </ul>
        </div>
        <div id="commentForm">
<script type="text/javascript">
function checkComment(objForm) {
    if (objForm.name.value=="") {
        alert("请输姓名！");
        objForm.name.focus();
        return false;
    }
    if (objForm.content.value=="") {
        alert("请输入内容！");
        objForm.content.focus();
        return false;
    }   
}
</script>
            <h2>[发表评论]</h2>
            <form method="post" action="<?php echo url_for('article/comment') ?>" onsubmit="return checkComment(this)">
                <input type="hidden" name="article_id" value="<?php echo $article->getId() ?>" />
                <div><label for="cname">姓　名：</label><input class="textField" id="name" name="name" type="text" /></div>        
                <div><label for="curl">网　址：</label><input class="textField" id="homepage" name="homepage" type="text" /></div>
                <!-- 
                <div><label for="cvari">验证码</label><input class="textField" id="cvari" name="vari" type="text" /></div>
                 -->
        
                <div><textarea name="content" rows="8"></textarea></div>
                <div class="submit">
                    <input class="btn" name="addsub" value="提 交" type="submit" />
                </div>
            </form>
        
        </div>
    </div>
    
    <div id="outerSidebar">
        <div id="sidebarL">
            <div id="share" class="module">
                <h2>[分享此文]</h2>
                <p><a href="#">加入收藏夹</a></p>
                <p><a href="#">添加到del.icio.us</a></p>
                <p>分享本文地址：</p>
                <input class="url" type="text" value="http://abc.blogbus.com.abc.html" />
                <input class="btn" type="button" value="复 制" />
            </div>
            <div id="relate" class="module">
                <h2>[相关文章]</h2>
                <ul>
                <?php foreach ($xg as $x): ?>
                    <li><a href="<?php echo url_for('article/show/id/'.$x->getId()) ?>"><?php echo $x->getTitle() ?></a></li>
                <?php endforeach; ?>
                </ul>
            </div>
            <div id="news" class="module">
                <h2>[最新文章]</h2>
                <ul>
                <?php foreach ($newArticles as $newArticle): ?>
                    <li><a href="<?php echo url_for('article/show/id/'.$newArticle->getId()) ?>"><?php echo $newArticle->getTitle() ?></a></li>
                <?php endforeach; ?>
                </ul>
            </div>
        </div>
    </div>